package com.qf.entity;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Admin {
    private String username;
    private String password;

    private String name;
    private String sex;
    private String birthday;
    List<String> powers;
    private String natives;
    private String Header;
    public Admin() { }
    public Admin(String username, String password, String name, String sex, String birthday, String[] powers, String natives) {
        this.username = username;
        this.password = password;
        this.name = name;
        this.sex = sex;
        this.birthday = birthday;
        this.powers = Arrays.asList(powers);
        this.natives = natives;
    }


    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public List<String> getPowers() {
        return powers;
    }

    public void setPowers(List<String> powers) {
        this.powers = powers;
    }
    public void setPowers(String  powers) {
        if (this.powers == null){
            this.powers = new ArrayList<>();
        }
        this.powers.add(powers);
    }

    public String getNatives() {
        return natives;
    }

    public void setNatives(String natives) {
        this.natives = natives;
    }

    public String getHeader() {
        return Header;
    }

    public void setHeader(String header) {
        Header = header;
    }

    @Override
    public String toString() {
        return "Student{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", birthday='" + birthday + '\'' +
                ", powers=" + powers +
                ", natives='" + natives + '\'' +
                '}';
    }




}
